<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/4
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>订单列表</title>
    <style>
        .main {
            border: 2px solid cornflowerblue;
            padding-bottom: 30px;

        }

        .main_msg {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            margin-bottom: 20px;
        }

        .blue_text {
            width: 100px;
            background: rgb(112, 144, 183);
        }

        table, tr, td {
            border: 1px solid rgb(152, 194, 193);
            text-align: center;
        }

        td {
            padding: 9px;
        }

        table {
            margin: auto;
            width: 650px;
        }

    </style>
</head>
<body>

<div style="width: 760px">
    <%@ include file="../common/header.jsp" %>

    <div class="main">
        <div style="margin: 10px 20px">
            <img src="../img/order.gif" alt="订单">
        </div>
        <div class="main_msg">
            <div style="margin-bottom: 10px"><b>已经处理的定单
            </b></div>
        </div>
        <table cellspacing="0" cellpadding="12">
            <tr>
                <td class="blue_text">定单号</td>
                <td class="blue_text">下单时间</td>
                <td class="blue_text">查看</td>
            </tr>
            <c:forEach items="${orders}" var="order">
                <tr>
                    <td>${order.orderNum}</td>
                    <td>${order.orderTime}</td>
                    <td style="width: 100px;"><a href="${pageContext.request.contextPath}/order/detail?orderNum=${order.orderNum}">查看订单详细信息</a></td>

                </tr>
            </c:forEach>

        </table>
        <div style="display: flex; justify-content: center;margin-bottom: 30px">
            <a style="margin-right: 35px" href="${pageContext.request.contextPath}/order/listok?p=1">第一页</a>
            <a style="margin-right: 35px" href="${pageContext.request.contextPath}/order/listok?p=${pre}">前一页</a>
            <a style="margin-right: 35px" href="${pageContext.request.contextPath}/order/listok?p=${next}">下一页</a>
            <a style="margin-right: 35px" href="${pageContext.request.contextPath}/order/listok?p=${total}">最末页</a>
        </div>

    </div>
    <%@ include file="../common/footer.jsp" %>
</div>
</body>
</html>
